package Practice.Practice_01;

public class demo11 {
    public static void main(String[] args){
        int[] arr = {4,1,6,3,9,8};
        int max = getMax(arr);
        System.out.println("Max = " + max);
        boolean flag = getNum();
        System.out.println("flag = " + flag);
    }
    public static int getMax(int[] arr){
        int max = arr[0];
        for(int i = 1; i < arr.length; i++){
            if(arr[i] > max){
                max = arr[i];
            }
        }
        return max;
    }
    public static boolean getNum(){
        int[] arr = new int[5];
        arr[0] = 12;
        arr[4] = 23;
        System.out.println(arr[0] + " " + arr[4]);
        System.out.println(arr[1]);
        int[] sr = arr;
        System.out.println(sr[0] + " " + sr[4]);
        sr[1] = 555;
        System.out.println(sr[1] + " " + arr[1]);
        return arr[1] == sr[1];
    }
}
